var fanhui = document.querySelector('header>a')
fanhui.onclick = function () {
    location.href = "../index.html"
}
console.log(location.href)
var url=location.href
if(url.length<=51){
    alert('您还没有个人账号，请返回注册页面注册账号')
}

var wangzhi=getUrlParams(url)
console.log(wangzhi)
let {shoujizhi}=wangzhi
let {mimazhi}=wangzhi
console.log(shoujizhi)
console.log(mimazhi)

//获取登录按钮及文本框，密码框
var btn=document.querySelector('form>h2')
console.log(btn)
var input1=document.querySelector('form>input:nth-of-type(1)')
var input2=document.querySelector('form>input:nth-of-type(2)')

btn.onclick=function(){
  console.log(input1.value,input2.value)
  if(input1.value==shoujizhi&&input2.value==mimazhi){
     location.href="../index.html"
  }
 
//   else if(shoujizhi===""||mimazhi===""){
//       alert('您还尚未注册个人账号')
//   }
  else {
    alert('您的账号或密码不正确')
}
}
